﻿<fieldset class="table-search-fieldset">
    <legend>搜索信息</legend>
    <form class="layui-form layui-form-pane" action="">
        <div class="layui-form-item" style="margin-bottom: 0px;">
            <div class="layui-inline">
                <div class="layui-input-inline" style="width: 130px;">
                    <input type="text" name="UserName" placeholder="操作用户" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <div class="layui-input-inline" style="width: 130px;">
                    <input type="text" name="TableName" placeholder="操作表名" style="display:block" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <div class="layui-input-inline" style="width: 130px;">
                    <input type="text" name="OpeType" placeholder="操作类型" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <div class="layui-input-inline" style="width: 130px;">
                    <input type="text" name="OpeResult" placeholder="操作结果" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <div class="layui-input-inline" style="width: 130px;">
                    <input type="text" name="OpeDetail" placeholder="操作详情" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <div class="layui-input-inline">
                    <input type="text" name="Remark" placeholder="备注" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-inline" id="date">
                <div class="layui-input-inline" style="width: 130px;">
                    <input type="text" autocomplete="off" id="startDate" name="AddTime" readonly class="layui-input" value="@DateTime.Now.AddDays(-5).ToString("yyyy-MM-dd")" placeholder="开始日期">
                </div>
                <div class="layui-form-mid">
                    -
                </div>
                <div class="layui-input-inline" style="width: 130px;">
                    <input type="text" autocomplete="off" id="endDate" name="UpdateTime" readonly class="layui-input" value="@DateTime.Now.ToString("yyyy-MM-dd")" placeholder="结束日期">
                </div>
            </div>
            <div class="layui-inline">
                <button type="button" class="layui-btn layui-btn-primary" id="btnQuery"><i class="layui-icon layui-icon-search"></i>搜索</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
</fieldset>
<table class="layui-hide" id="datatable" lay-filter="datatable"></table>
@section Scripts{
    <script type="text/html" id="toolbar">
    </script>
    <script src="/js/datatable.js" charset="utf-8"></script>
    <script>
        layui.use(function () {
            var laydate = layui.laydate;
            var $ = layui.jquery,
                table = layui.table;
            var util = layui.util;
            laydate.render({
                elem: '#date'
                , range: ['#startDate', '#endDate']
            });
            var options = {
                url: "/SysLog/Index",
                cols: [[
                    {
                        field: 'UserName',
                        title: '操作用户',
                        width: 150
                    },
                    {
                        field: 'TableName',
                        title: '表名',
                        width: 150
                    },
                    {
                        field: 'OpeType',
                        title: '类型',
                        width: 150
                    },
                    {
                        field: 'OpeResult',
                        title: '结果',
                        width: 150
                    },
                    {
                        field: 'OpeDetail',
                        title: '操作详情'
                    },
                    {
                        field: 'Remark',
                        title: '备注'
                    },
                    {
                        field: 'AddTime',
                        title: '操作时间',
                        width: 200
                    }
                ]]
            };
            layui.dataTable(options);
        });
    </script>
}